//
//  BKSignGoodsNameViewCell.m
//  bestkeep
//
//  Created by yons on 16/12/5.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "BKSignGoodsNameViewCell.h"
#import "BKMainCommon.h"


@implementation BKSignGoodsNameViewCell


- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self){
        [self initView];
        self.backgroundColor = RGB(241, 242, 243);
    }
    return self;
}
-(void)relayOutUI:(id)data{
    
}

-(void)initView{
    
    
    UILabel *lab_title =[[UILabel alloc]initWithFrame:CGRectZero];
    lab_title.alpha=0.8;
    lab_title.textColor=[UIColor blackColor];
    lab_title.font=[UIFont systemFontOfSize:15];
    lab_title.text =@"兑换商品";
    lab_title.textAlignment=NSTextAlignmentCenter;
    //    CGFloat WIDTHLAB = [BKTool getWidthWithTitle:lab_title.text font:15.0];
    [self  addSubview:lab_title];
    [lab_title mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.centerY.equalTo(self.mas_centerY);
        
    }];
    
    UIView * view_line_left=[[UIView alloc]init];
    view_line_left.backgroundColor=RGBACOLOR(225, 226, 227, 1);
    [self addSubview:view_line_left];
    [view_line_left mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left).offset(10);
        make.right.mas_equalTo(lab_title.mas_left).offset(0);
        make.height.equalTo(@(0.5));
        make.centerY.equalTo(self.mas_centerY);
    }];
    
    UIView * view_line_right=[[UIView alloc]init];
    view_line_right.backgroundColor=RGBACOLOR(225, 226, 227, 1);
    [self addSubview:view_line_right];
    [view_line_right mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(lab_title.mas_right).offset(0);
        make.right.mas_equalTo(self.mas_right).offset(-10);
        make.height.equalTo(@(0.5));
        make.centerY.equalTo(self.mas_centerY);
    }];
}
+(CGSize)setSize:(id)data{
    if (!data) {
        return CGSizeZero;
    }else{
        return CGSizeMake(ScreenWidth,54);
    }
}
@end
